import request from '@/utils/request'

// 查询激活码列表
export function listInvitation(query) {
  return request({
    url: '/language/invitation/list',
    method: 'get',
    params: query
  })
}

// 查询激活码详细
export function getInvitation(userId) {
  return request({
    url: '/language/invitation/' + userId,
    method: 'get'
  })
}

// 新增激活码
export function addInvitation(data) {
  return request({
    url: '/language/invitation',
    method: 'post',
    data: data
  })
}

// 修改激活码
export function updateInvitation(data) {
  return request({
    url: '/language/invitation',
    method: 'put',
    data: data
  })
}

// 删除激活码
export function delInvitation(userId) {
  return request({
    url: '/language/invitation/' + userId,
    method: 'delete'
  })
}
